package file;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: xiaotutu
 * Date: 2025-03-04
 * Time: 21:13
 */
//Writer的使用
public class Demo9 {
    public static void main(String[] args) throws IOException {
        try(Writer writer = new FileWriter("c:/code/test.txt", true)) {
            // write 是可以一次直接写一个字符串. 这个是非常方便的.
            writer.write("hello java");
        }
    }
}
